package com.memento.game.self;

public class RaceCar {

    public int defence;

    public int attack;

    public Record saveRecord(){
        return new Record(this.defence,this.attack);
    }

    public void getStateFromRecord(Record record){
        this.attack= record.attack;
        this.defence= record.defence;
    }

    public void display(){
        System.out.println("该辆车的防御值是"+String.valueOf(this.defence)+"攻击力是"+String.valueOf(this.attack));
    }

    public int getDefence() {
        return defence;
    }

    public void setDefence(int defence) {
        this.defence = defence;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }
}
